package br.com.sipsoft.svola.entidades;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import lombok.Getter;
import lombok.Setter;

@Entity
@Table(name="TBMANAD_K250")
public class ManadK250 extends BaseEntity{

	@Id
	@Column(name="MANADK250_ID")
	@SequenceGenerator(name="MANADK250_SEQ", allocationSize = 1)
	@GeneratedValue(strategy=GenerationType.SEQUENCE)
	private @Getter @Setter Long id;
		
	@ManyToOne
	@JoinColumn(name="TIPO_REGISTRO_ID")
	private @Getter @Setter ManadTipoRegistro manadTipoRegistro;
	
	@Column(name="CNPJ")
	private @Getter @Setter String cnpj;
	
	@Column(name="INDI_FL")
	private @Getter @Setter Long indicadorTipoFolha;
	
	@Column(name="COD_LTC")
	private @Getter @Setter String codigoLotacao;
	
	@Column(name="COD_REG_TRAB")
	private @Getter @Setter String codigoRegistroTrabalhador;
	
	@Column(name="DT_COMP")
	private @Getter @Setter Date dataCampoPeriodo;

	@Column(name="DT_PGTO")
	private @Getter @Setter Date dataPagamento;

	@Column(name="COD_CBO")
	private @Getter @Setter Long codigoBrasileiroOcupacao;
	
	@Column(name="COD_OCORR")
	private @Getter @Setter Long codigoOcorrencia;
	
	@Column(name="DESC_CARGO")
	private @Getter @Setter String descricaoCargo;
	
	@Column(name="QTDE_DEP_IR")
	private @Getter @Setter Long quantidadeDependentesImpostoRenda;
	
	@Column(name="QTDE_DEP_SF")
	private @Getter @Setter Long quantidadeDependentesSalarioFamilia;
	
	@Column(name="VL_BASE_IRRF")
	private @Getter @Setter Double valorBaseCalculoImpostoRendaIRRF;
	
	@Column(name="VL_BASE_PS")
	private @Getter @Setter Double valorBaseCalculoPrevidenciaSocial;
	
	@Override
	public void save() throws Exception {
		hibernateUtils.saveWithoutSession(this);
	}
	
}
